<template>
  <div class="container">
    <el-form ref="form" :model="formData" label-width="120px" label-position="left" style="padding: 0 10px">
      <div class="c-box">
        <!-- 基础信息部分 -->
        <div class="upload-title-box">
          <div class="upload-title">基本信息</div>
        </div>
        <hk-form
          ref="hkFormRef1"
          :form-labels="basicArr"
          :rules="formRules"
          :data="formData"
          :dict-list="dictList"
          :btn-hidden="true"
          label-width="120">
          <template #filter-execValue>
            <!-- 周期  -->
            <div v-if="formData.cronType == '0'" class="flexBox">
              <span style="margin: 0 5px">每 </span>
              <el-form-item prop="cycleTime">
                <el-input-number
                  v-model="formData.cycleTime"
                  style="margin: 0 10px 0 0"
                  controls-position="right"
                  :min="1"
                  :max="60"
                  @change="changeCron" />
              </el-form-item>
              <el-form-item prop="cycleNode">
                <el-select v-model="formData.cycleNode" placeholder="请选择" @change="changeCron">
                  <el-option
                    v-for="item in cycleNodeOption"
                    :key="item.itemVale"
                    :label="item.itemLabel"
                    :value="item.itemVale" />
                </el-select>
              </el-form-item>
              <span style="margin: 0 5px">执行一次</span>
            </div>
            <div v-else class="flexBox">
              <!-- 定期  -->
              <el-form-item prop="timeNode">
                <el-select
                  v-model="formData.timeNode"
                  style="margin: 0 10px 0 0"
                  placeholder="请选择"
                  prop="timeNode"
                  @change="changeCron">
                  <el-option
                    v-for="item in timeNodeOptions"
                    :key="item.itemVale"
                    :label="item.itemLabel"
                    :value="item.itemVale" />
                </el-select>
              </el-form-item>
              <el-form-item v-if="formData.timeNode == 'weekly'" prop="day">
                <el-select v-model="formData.day" style="margin: 0 10px 0 0" placeholder="请选择" @change="changeCron">
                  <el-option
                    v-for="item in cronWeeklyOptions"
                    :key="item.itemVale"
                    :label="item.itemLabel"
                    :value="item.itemVale" />
                </el-select>
                <el-select
                  v-if="formData.timeNode == 'monthly'"
                  v-model="formData.day"
                  style="margin: 0 10px 0 0"
                  placeholder="请选择"
                  @change="changeCron">
                  <el-option
                    v-for="item in monthlyOptions"
                    :key="item.itemVale"
                    :label="item.itemLabel"
                    :value="item.itemVale" />
                </el-select>
              </el-form-item>
              <el-form-item prop="times">
                <el-select v-model="formData.times" placeholder="请选择" @change="changeCron">
                  <el-option
                    v-for="item in timesOptions"
                    :key="item.itemVale"
                    :label="item.itemLabel"
                    :value="item.itemVale" />
                </el-select>
              </el-form-item>
              <span style="margin: 0 5px">执行一次</span>
            </div>
          </template>
        </hk-form>
      </div>
      <div class="c-box">
        <div class="upload-title-box">
          <div class="upload-title">资格情况</div>
        </div>
        <hk-form
          ref="hkFormRef2"
          :form-labels="basicOrder"
          :rules="formRules"
          :data="formData"
          :dict-list="dictList"
          :btn-hidden="true"
          label-width="120">
          <template #filter-order>
            <el-select v-model="formData.order" multiple placeholder="请选择" style="width: 100%" @change="changeOrder">
              <el-option
                v-for="item in dictList.workList"
                :key="item.serviceId"
                :label="item.serviceName"
                :value="item.serviceId" />
            </el-select>
          </template>
          <template #filter-orderList>
            <el-table ref="tableBox" :data="formData.orderList">
              <el-table-column type="index" label="序号" />
              <el-table-column prop="orderName" label="工单标题">
                <template slot-scope="scope">
                  <el-form-item :prop="'orderList.' + scope.$index + '.orderName'" :rules="formRules.orderName">
                    <el-input v-model="scope.row.orderName" placeholder="请输入" style="width: 100%" :maxlength="50" />
                  </el-form-item>
                </template>
              </el-table-column>
              <el-table-column prop="serviceName" label="流程名称" />
              <el-table-column label="操作" align="center">
                <template slot-scope="scope">
                  <el-button type="text" @click="handleDelete(scope)">删除</el-button>
                </template>
              </el-table-column>
            </el-table>
          </template>
        </hk-form>
      </div>
    </el-form>
    <footer>
      <el-button v-if="!$route.query.showDetail" type="primary" @click="submitForm">保 存</el-button>
      <el-button @click="cancel">取 消</el-button>
    </footer>
  </div>
</template>

<script>
import HkForm from '@/components/Hk-Form'
import { getDictList, details, listServiceFlow, add, update } from '@/api/specialProject/periodicity'
export default {
  components: { HkForm },
  data() {
    return {
      // 表单数据
      // 仅展示必填信息
      showMore: false,
      showRequired: false,
      formData: {
        jobName: '',
        remark: '',
        cronType: '0',
        execValue: undefined,
        order: [],
        orderList: [],
      },
      tableList: [
        { label: '流水号', param: 'postName' },
        { label: '等级', param: 'secLevel' },
        { label: '关联的应用名称', param: 'product' },
      ],
      // 表1 基础信息
      basicArr: [
        {
          label: '任务名称',
          field: 'jobName',
          type: 'input',
          maxlength: 50,
          span: 13,
        },
        {
          label: '任务描述',
          field: 'remark',
          type: 'textarea',
          maxlength: 500,
          span: 13,
        },
        {
          label: '执行方式',
          field: 'cronType',
          type: 'radio',
          maxlength: 50,
          list: 'typeList',
          span: 24,
        },
        {
          label: '执行配置',
          field: 'execValue',
          type: 'slot',
          span: 24,
        },
      ],
      // 表2基础信息
      basicOrder: [
        {
          label: '流程名称',
          field: 'order',
          type: 'slot',
          span: 13,
          list: 'workList',
        },
        {
          label: '表单',
          field: 'orderList',
          type: 'slot',
          span: 24,
        },
      ],

      // 表单校验
      formRules: {
        jobName: [{ required: true, message: '不能为空', trigger: 'blur' }],
        cronType: [{ required: true, message: '请选择', trigger: 'blur' }],
        execValue: [{ required: true, message: '不能为空', trigger: 'blur' }],
        order: [{ required: true, message: '请选择', trigger: 'blur' }],
        orderName: [{ required: true, message: '请选择', trigger: 'change' }],
        cycleTime: [
          {
            required: true,
            message: '请输入',
            trigger: 'change',
          },
        ],
        cycleNode: [
          {
            required: true,
            message: '请选择',
            trigger: 'change',
          },
        ],
        timeNode: [
          {
            required: true,
            message: '请选择',
            trigger: 'change',
          },
        ],
        day: [
          {
            required: true,
            message: '请选择',
            trigger: 'change',
          },
        ],
        times: [
          {
            required: true,
            message: '请选择',
            trigger: 'change',
          },
        ],
      },
      dictList: {
        typeList: [
          {
            label: '周期性',
            value: '0',
          },
          {
            label: '定期',
            value: '1',
          },
        ],
        workList: [
          {
            id: 'Process_pdTu692:2:81200bce-7c9b-11ee-8e7c-0a8fc39d1f00',
            createUserId: null,
            createTime: '2023-11-06 19:56:22',
            updateUserId: null,
            updateTime: '2023-11-08 09:19:16',
            flowName: '知识创建审核流程',
            codeNumFormat: 'ZSK,yearMonthDay,4',
            description: null,
            xmlResource:
              '<?xml version="1.0" encoding="UTF-8"?>\n<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn"><bpmn:process id="Process_pdTu692" isExecutable="true"><bpmn:startEvent id="StartEvent_1"><bpmn:outgoing>Flow_10ep7jg</bpmn:outgoing></bpmn:startEvent><bpmn:userTask id="Activity_1l8jag1" name="发起" camunda:formRef="1168844843456135168" camunda:formRefBinding="latest"><bpmn:extensionElements><camunda:properties><camunda:property name="HangUp" value="false" /><camunda:property name="formPermission" value="[]" /><camunda:property name="ShowComment" value="false" /><camunda:property name="nodeAssignMode" value="autoAssign" /><camunda:property name="candidateMode" value="allUser" /><camunda:property name="assignDept" value="false" /><camunda:property name="multiType" value="single" /><camunda:property name="allowReject" value="false" /><camunda:property name="allowRejectNodes" value="" /><camunda:property name="noticeConfig" value="{&#34;notify&#34;:false,&#34;noticeList&#34;:[]}" /></camunda:properties></bpmn:extensionElements><bpmn:incoming>Flow_10ep7jg</bpmn:incoming><bpmn:outgoing>Flow_07fb3jl</bpmn:outgoing></bpmn:userTask><bpmn:sequenceFlow id="Flow_10ep7jg" sourceRef="StartEvent_1" targetRef="Activity_1l8jag1" /><bpmn:userTask id="Activity_0w85tj8" name="审核" camunda:formRef="1168844843456135168" camunda:formRefBinding="latest" camunda:candidateGroups="1098995695089614848"><bpmn:extensionElements><camunda:properties><camunda:property name="HangUp" value="false" /><camunda:property name="formPermission" value="[]" /><camunda:property name="ShowComment" value="false" /><camunda:property name="nodeAssignMode" value="autoAssign" /><camunda:property name="candidateMode" value="role" /><camunda:property name="assignDept" value="false" /><camunda:property name="multiType" value="single" /><camunda:property name="allowReject" value="false" /><camunda:property name="allowRejectNodes" value="Activity_1l8jag1" /><camunda:property name="noticeConfig" value="{&#34;notify&#34;:false,&#34;noticeList&#34;:[]}" /></camunda:properties></bpmn:extensionElements><bpmn:incoming>Flow_07fb3jl</bpmn:incoming><bpmn:outgoing>Flow_0tiiowy</bpmn:outgoing></bpmn:userTask><bpmn:sequenceFlow id="Flow_07fb3jl" sourceRef="Activity_1l8jag1" targetRef="Activity_0w85tj8" /><bpmn:endEvent id="Event_0kizon6"><bpmn:incoming>Flow_0tiiowy</bpmn:incoming></bpmn:endEvent><bpmn:sequenceFlow id="Flow_0tiiowy" sourceRef="Activity_0w85tj8" targetRef="Event_0kizon6" /></bpmn:process><bpmndi:BPMNDiagram id="BPMNDiagram_1"><bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_pdTu692"><bpmndi:BPMNEdge id="Flow_0tiiowy_di" bpmnElement="Flow_0tiiowy"><di:waypoint x="590" y="120" /><di:waypoint x="652" y="120" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Flow_07fb3jl_di" bpmnElement="Flow_07fb3jl"><di:waypoint x="430" y="120" /><di:waypoint x="490" y="120" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Flow_10ep7jg_di" bpmnElement="Flow_10ep7jg"><di:waypoint x="276" y="120" /><di:waypoint x="330" y="120" /></bpmndi:BPMNEdge><bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"><dc:Bounds x="240" y="102" width="36" height="36" /></bpmndi:BPMNShape><bpmndi:BPMNShape id="Activity_1l8jag1_di" bpmnElement="Activity_1l8jag1"><dc:Bounds x="330" y="80" width="100" height="80" /></bpmndi:BPMNShape><bpmndi:BPMNShape id="Activity_0w85tj8_di" bpmnElement="Activity_0w85tj8"><dc:Bounds x="490" y="80" width="100" height="80" /></bpmndi:BPMNShape><bpmndi:BPMNShape id="Event_0kizon6_di" bpmnElement="Event_0kizon6"><dc:Bounds x="652" y="102" width="36" height="36" /></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn:definitions>',
            nodeInfo: null,
            nodeCondition: null,
            cancellation: 1,
            status: 1,
            enable: 1,
            version: 2,
            type: 2,
            deleted: 1,
            flowProcessId: 'Process_pdTu692:2:81200bce-7c9b-11ee-8e7c-0a8fc39d1f00',
            ref: null,
            flowProcessKey: 'Process_pdTu692',
            serviceId: '1168849367759585281',
            serviceName: '知识审核流程',
            isSystem: false,
            flowUniqueId: 'Process_pdTu692:2:81200bce-7c9b-11ee-8e7c-0a8fc39d1f00:2',
          },
          {
            id: 'Process_6TLnbM6:34:9be396bd-6737-11ee-bbf0-00ff340e69e9',
            createUserId: null,
            createTime: '2023-10-10 14:38:23',
            updateUserId: null,
            updateTime: '2023-10-10 14:38:25',
            flowName: '测试01',
            codeNumFormat: 'ZJG,yearMonthDay,3',
            description: null,
            xmlResource:
              '<?xml version="1.0" encoding="UTF-8"?>\n<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn"><bpmn:process id="Process_6TLnbM6" isExecutable="true"><bpmn:startEvent id="StartEvent_1"><bpmn:outgoing>Flow_1k25p9u</bpmn:outgoing></bpmn:startEvent><bpmn:userTask id="Activity_0h21k20" name="发起" camunda:formRef="1156298362434093056" camunda:formRefBinding="latest"><bpmn:extensionElements><camunda:properties><camunda:property name="HangUp" value="false" /><camunda:property name="formPermission" value="[{&#34;id&#34;:&#34;userName&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;idCard&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;unitId&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;deptIds&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;sex&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;politicalClimate&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;nation&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;birthday&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;phoneNum&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;email&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;status&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;secLevel&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;postIds&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169572501569054543&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675314152824060&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675314152871753&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675314152868524&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675322414968020&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675322414989324&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675322414932178&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675323362548329&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675323362522644&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675323362591395&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675324388865199&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675324388835707&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675324388880926&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675325416535050&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a1696753254165462&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;ryrgfj&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a1696753261552926&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;gqscsm&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;gqscfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675326853879852&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;bmpxsm&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;bmpxfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675290493611572&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;wfzjlsm&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;wfzjlfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false}]" /><camunda:property name="nodeAssignMode" value="preNodeAssign" /><camunda:property name="candidateMode" value="allUser" /><camunda:property name="assignDept" value="false" /><camunda:property name="multiType" value="single" /><camunda:property name="allowReject" value="false" /><camunda:property name="allowRejectNodes" value="" /><camunda:property name="noticeConfig" value="{&#34;notify&#34;:false,&#34;noticeList&#34;:[]}" /><camunda:property name="ShowComment" value="false" /></camunda:properties><camunda:taskListener class="com.hkinfo.ticket.order.listener.RestNoticeListener" event="complete" listenerId="21cdb755-f92e-44d2-bc7c-b829894601da"><camunda:field name="condition" stringValue="{}" /><camunda:field name="config" stringValue="{&#34;restUrlFxVisible&#34;:false,&#34;restUrlValue&#34;:[],&#34;restUrlLabel&#34;:&#34;http://192.168.1.219:19704/action-api/user/add&#34;,&#34;contentType&#34;:&#34;application/json&#34;,&#34;headerList&#34;:[{&#34;key&#34;:&#34;&#34;,&#34;value&#34;:&#34;&#34;}],&#34;bodyListFxVisible&#34;:false,&#34;bodyListValue&#34;:[[&#34;Activity_0h21k20&#34;,&#34;_1156298362434093056&#34;,&#34;allData&#34;],[&#34;Activity_0h21k20&#34;,&#34;_1156298362434093056&#34;,&#34;allData&#34;]],&#34;bodyListLabel&#34;:&#34;${发起:入岗表单:全部数据}&#34;,&#34;requestType&#34;:&#34;POST&#34;,&#34;restUrl&#34;:&#34;http://192.168.1.219:19704/action-api/user/add&#34;,&#34;bodyList&#34;:&#34;${Activity_0h21k20:_1156298362434093056:allData}&#34;}" /></camunda:taskListener></bpmn:extensionElements><bpmn:incoming>Flow_1k25p9u</bpmn:incoming><bpmn:outgoing>Flow_14795ho</bpmn:outgoing></bpmn:userTask><bpmn:sequenceFlow id="Flow_1k25p9u" sourceRef="StartEvent_1" targetRef="Activity_0h21k20" /><bpmn:sequenceFlow id="Flow_14795ho" sourceRef="Activity_0h21k20" targetRef="Activity_0fzhep7"><bpmn:extensionElements><camunda:properties><camunda:property name="conditionConfig" value="{&#34;conditions&#34;:[],&#34;conditionConfig&#34;:{&#34;conditions&#34;:[],&#34;setCondition&#34;:&#34;all&#34;,&#34;selectedRow&#34;:{&#34;variable&#34;:&#34;&#34;,&#34;variableLabel&#34;:&#34;&#34;,&#34;conditionalOpt&#34;:&#34;&#34;,&#34;conditionalOptLabel&#34;:&#34;&#34;,&#34;conditionalVal&#34;:&#34;&#34;,&#34;conditionalValLabel&#34;:&#34;&#34;}},&#34;expression&#34;:&#34;&#34;}" /></camunda:properties></bpmn:extensionElements></bpmn:sequenceFlow><bpmn:userTask id="Activity_0fzhep7" name="审批" camunda:formRef="" camunda:formRefBinding="latest" camunda:assignee="${assignee}" camunda:candidateGroups="1098995695089614848"><bpmn:extensionElements><camunda:properties><camunda:property name="formPermission" value="[{&#34;id&#34;:&#34;userName&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;idCard&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;unitId&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;deptIds&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;sex&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;politicalClimate&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;nation&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;birthday&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;phoneNum&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;email&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;status&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;secLevel&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;postIds&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;a169572501569054543&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675314152824060&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675314152871753&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675314152868524&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675322414968020&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675322414989324&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675322414932178&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675323362548329&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675323362522644&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675323362591395&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675324388865199&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675324388835707&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675324388880926&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675325416535050&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a1696753254165462&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;ryrgfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a1696753261552926&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;gqscsm&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;gqscfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675326853879852&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;bmpxsm&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;bmpxfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675290493611572&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;wfzjlsm&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;wfzjlfj&#34;,&#34;display&#34;:false,&#34;disabled&#34;:false}]" /><camunda:property name="nodeAssignMode" value="autoAssign" /><camunda:property name="candidateMode" value="role" /><camunda:property name="assignDept" value="false" /><camunda:property name="multiType" value="multiParallel" /><camunda:property name="noticeConfig" value="{&#34;notify&#34;:false,&#34;noticeList&#34;:[]}" /><camunda:property name="HangUp" value="false" /><camunda:property name="allowReject" value="true" /><camunda:property name="allowRejectNodes" value="Activity_0h21k20" /><camunda:property name="ShowComment" value="true" /><camunda:property name="candidateRoleIds" value="" /></camunda:properties></bpmn:extensionElements><bpmn:incoming>Flow_14795ho</bpmn:incoming><bpmn:outgoing>Flow_1lcefd8</bpmn:outgoing><bpmn:multiInstanceLoopCharacteristics camunda:collection="${userRoleService.getUserFormRole(&#34;1098995695089614848&#34;)}" camunda:elementVariable="assignee" /></bpmn:userTask><bpmn:userTask id="Activity_1mw0zis" name="上传证明" camunda:formRef="" camunda:formRefBinding="latest"><bpmn:extensionElements><camunda:properties><camunda:property name="HangUp" value="false" /><camunda:property name="formPermission" value="[{&#34;id&#34;:&#34;userName&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;idCard&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;unitId&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;deptIds&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;sex&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;politicalClimate&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;nation&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;birthday&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;phoneNum&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;email&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;status&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;secLevel&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;postIds&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;a169572501569054543&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675314152824060&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675314152871753&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675314152868524&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675322414968020&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675322414989324&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675322414932178&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675323362548329&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675323362522644&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675323362591395&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675324388865199&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675324388835707&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675324388880926&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675325416535050&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a1696753254165462&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;ryrgfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a1696753261552926&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;gqscsm&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;gqscfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675326853879852&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;bmpxsm&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;bmpxfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;a169675290493611572&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;wfzjlsm&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false},{&#34;id&#34;:&#34;wfzjlfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:false}]" /><camunda:property name="nodeAssignMode" value="preNodeAssign" /><camunda:property name="candidateMode" value="allUser" /><camunda:property name="assignDept" value="false" /><camunda:property name="multiType" value="single" /><camunda:property name="allowReject" value="false" /><camunda:property name="allowRejectNodes" value="" /><camunda:property name="noticeConfig" value="{&#34;notify&#34;:false,&#34;noticeList&#34;:[]}" /><camunda:property name="ShowComment" value="false" /></camunda:properties></bpmn:extensionElements><bpmn:incoming>Flow_1lcefd8</bpmn:incoming><bpmn:outgoing>Flow_1806zep</bpmn:outgoing></bpmn:userTask><bpmn:sequenceFlow id="Flow_1lcefd8" sourceRef="Activity_0fzhep7" targetRef="Activity_1mw0zis"><bpmn:extensionElements><camunda:properties><camunda:property name="conditionConfig" value="{&#34;conditions&#34;:[],&#34;conditionConfig&#34;:{&#34;conditions&#34;:[{&#34;id&#34;:&#34;944d2de1-e0df-4dba-9426-3b95353eaf76&#34;,&#34;variable&#34;:[&#34;Activity_0fzhep7&#34;,&#34;_1155909501711286272&#34;,&#34;a169563186333163202&#34;],&#34;variableLabel&#34;:&#34;审批/入岗-审批/审批&#34;,&#34;conditionalOpt&#34;:&#34;==&#34;,&#34;conditionalOptLabel&#34;:&#34;等于&#34;,&#34;conditionalVal&#34;:&#34;0&#34;,&#34;conditionalValLabel&#34;:&#34;0&#34;}],&#34;setCondition&#34;:&#34;all&#34;,&#34;selectedRow&#34;:{&#34;variable&#34;:&#34;&#34;,&#34;variableLabel&#34;:&#34;&#34;,&#34;conditionalOpt&#34;:&#34;&#34;,&#34;conditionalOptLabel&#34;:&#34;&#34;,&#34;conditionalVal&#34;:&#34;&#34;,&#34;conditionalValLabel&#34;:&#34;&#34;}},&#34;expression&#34;:&#34;${ Activity_0fzhep7._1155909501711286272.a169563186333163202 == &#39;0&#39; }&#34;}" /></camunda:properties></bpmn:extensionElements></bpmn:sequenceFlow><bpmn:userTask id="Activity_0zwv7v2" name="审核" camunda:formRef="" camunda:formRefBinding="latest"><bpmn:extensionElements><camunda:properties><camunda:property name="HangUp" value="false" /><camunda:property name="formPermission" value="[{&#34;id&#34;:&#34;userName&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;idCard&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;unitId&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;deptIds&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;sex&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;politicalClimate&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;nation&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;birthday&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;phoneNum&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;email&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;status&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;secLevel&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;postIds&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;a169572501569054543&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;a169675314152824060&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;ryscsm&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;ryscfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;a169675322414968020&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;lddhtsm&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;ldhtfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;a169675323362548329&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;sbjnsm&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;sbjnfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;a169675324388865199&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;rgbmsm&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;rgbmfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;a169675325416535050&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;rgsqsm&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;ryrgfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;a1696753261552926&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;gqscsm&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;gqscfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;a169675326853879852&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;bmpxsm&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;bmpxfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;a169675290493611572&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;wfzjlsm&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true},{&#34;id&#34;:&#34;wfzjlfj&#34;,&#34;display&#34;:true,&#34;disabled&#34;:true}]" /><camunda:property name="nodeAssignMode" value="preNodeAssign" /><camunda:property name="candidateMode" value="allUser" /><camunda:property name="assignDept" value="false" /><camunda:property name="multiType" value="single" /><camunda:property name="allowReject" value="true" /><camunda:property name="allowRejectNodes" value="Activity_1mw0zis,Activity_0h21k20" /><camunda:property name="noticeConfig" value="{&#34;notify&#34;:true,&#34;noticeList&#34;:[{&#34;id&#34;:&#34;0dc55e49-e9bc-4c1e-8876-834fea530c3c&#34;,&#34;enableCondition&#34;:false,&#34;conditionConfig&#34;:{},&#34;noticeType&#34;:&#34;rest&#34;,&#34;siteMsgNoticeConfig&#34;:{&#34;mailTitleFxVisible&#34;:false,&#34;mailTitleValue&#34;:[],&#34;mailContentFxVisible&#34;:false,&#34;mailContentValue&#34;:[],&#34;userType&#34;:[],&#34;mailContentLabel&#34;:&#34;&#34;},&#34;restApiNoticeConfig&#34;:{&#34;restUrlFxVisible&#34;:false,&#34;restUrlValue&#34;:[],&#34;restUrlLabel&#34;:&#34;http://192.168.1.219:19704/action-api/user/addFromTicket&#34;,&#34;contentType&#34;:&#34;application/json&#34;,&#34;headerList&#34;:[{&#34;key&#34;:&#34;&#34;,&#34;value&#34;:&#34;&#34;}],&#34;bodyListFxVisible&#34;:false,&#34;bodyListValue&#34;:[[&#34;Activity_0h21k20&#34;,&#34;_1156298362434093056&#34;,&#34;allData&#34;]],&#34;bodyListLabel&#34;:&#34;${发起:入岗表单:全部数据}&#34;,&#34;restUrl&#34;:&#34;http://192.168.1.219:19704/action-api/user/addFromTicket&#34;,&#34;requestType&#34;:&#34;POST&#34;,&#34;bodyList&#34;:&#34;${Activity_0h21k20:_1156298362434093056:allData}&#34;}}]}" /><camunda:property name="ShowComment" value="true" /></camunda:properties><camunda:taskListener class="com.hkinfo.ticket.order.listener.RestNoticeListener" event="complete" listenerId="0dc55e49-e9bc-4c1e-8876-834fea530c3c"><camunda:field name="condition" stringValue="{}" /><camunda:field name="config" stringValue="{&#34;restUrlFxVisible&#34;:false,&#34;restUrlValue&#34;:[],&#34;restUrlLabel&#34;:&#34;http://192.168.1.219:19704/action-api/user/addFromTicket&#34;,&#34;contentType&#34;:&#34;application/json&#34;,&#34;headerList&#34;:[{&#34;key&#34;:&#34;&#34;,&#34;value&#34;:&#34;&#34;}],&#34;bodyListFxVisible&#34;:false,&#34;bodyListValue&#34;:[[&#34;Activity_0h21k20&#34;,&#34;_1156298362434093056&#34;,&#34;allData&#34;]],&#34;bodyListLabel&#34;:&#34;${发起:入岗表单:全部数据}&#34;,&#34;restUrl&#34;:&#34;http://192.168.1.219:19704/action-api/user/addFromTicket&#34;,&#34;requestType&#34;:&#34;POST&#34;,&#34;bodyList&#34;:&#34;${Activity_0h21k20:_1156298362434093056:allData}&#34;}" /></camunda:taskListener></bpmn:extensionElements><bpmn:incoming>Flow_1806zep</bpmn:incoming><bpmn:outgoing>Flow_1hvsg9a</bpmn:outgoing></bpmn:userTask><bpmn:sequenceFlow id="Flow_1806zep" sourceRef="Activity_1mw0zis" targetRef="Activity_0zwv7v2" /><bpmn:endEvent id="Event_008jxmb"><bpmn:incoming>Flow_1hvsg9a</bpmn:incoming></bpmn:endEvent><bpmn:sequenceFlow id="Flow_1hvsg9a" sourceRef="Activity_0zwv7v2" targetRef="Event_008jxmb"><bpmn:extensionElements><camunda:properties><camunda:property name="conditionConfig" value="{&#34;conditions&#34;:[],&#34;conditionConfig&#34;:{&#34;conditions&#34;:[{&#34;id&#34;:&#34;757e968a-4244-449b-9887-8c2d8a1081a3&#34;,&#34;variable&#34;:[&#34;Activity_0fzhep7&#34;,&#34;_1155909501711286272&#34;,&#34;a169563186333163202&#34;],&#34;variableLabel&#34;:&#34;审批/入岗-审批/审批&#34;,&#34;conditionalOpt&#34;:&#34;==&#34;,&#34;conditionalOptLabel&#34;:&#34;等于&#34;,&#34;conditionalVal&#34;:&#34;0&#34;,&#34;conditionalValLabel&#34;:&#34;0&#34;}],&#34;setCondition&#34;:&#34;all&#34;,&#34;selectedRow&#34;:{&#34;variable&#34;:&#34;&#34;,&#34;variableLabel&#34;:&#34;&#34;,&#34;conditionalOpt&#34;:&#34;&#34;,&#34;conditionalOptLabel&#34;:&#34;&#34;,&#34;conditionalVal&#34;:&#34;&#34;,&#34;conditionalValLabel&#34;:&#34;&#34;}},&#34;expression&#34;:&#34;${ Activity_0fzhep7._1155909501711286272.a169563186333163202 == &#39;0&#39; }&#34;}" /></camunda:properties></bpmn:extensionElements></bpmn:sequenceFlow></bpmn:process><bpmndi:BPMNDiagram id="BPMNDiagram_1"><bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_6TLnbM6"><bpmndi:BPMNEdge id="Flow_1hvsg9a_di" bpmnElement="Flow_1hvsg9a"><di:waypoint x="970" y="160" /><di:waypoint x="970" y="200" /><di:waypoint x="1120" y="200" /><di:waypoint x="1120" y="138" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Flow_1806zep_di" bpmnElement="Flow_1806zep"><di:waypoint x="790" y="80" /><di:waypoint x="790" y="40" /><di:waypoint x="970" y="40" /><di:waypoint x="970" y="80" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Flow_1lcefd8_di" bpmnElement="Flow_1lcefd8"><di:waypoint x="640" y="120" /><di:waypoint x="740" y="120" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Flow_14795ho_di" bpmnElement="Flow_14795ho"><di:waypoint x="380" y="80" /><di:waypoint x="380" y="10" /><di:waypoint x="590" y="10" /><di:waypoint x="590" y="80" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id="Flow_1k25p9u_di" bpmnElement="Flow_1k25p9u"><di:waypoint x="276" y="120" /><di:waypoint x="330" y="120" /></bpmndi:BPMNEdge><bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"><dc:Bounds x="240" y="102" width="36" height="36" /></bpmndi:BPMNShape><bpmndi:BPMNShape id="Activity_0h21k20_di" bpmnElement="Activity_0h21k20"><dc:Bounds x="330" y="80" width="100" height="80" /></bpmndi:BPMNShape><bpmndi:BPMNShape id="Activity_0xxpx7j_di" bpmnElement="Activity_0fzhep7"><dc:Bounds x="540" y="80" width="100" height="80" /></bpmndi:BPMNShape><bpmndi:BPMNShape id="Activity_1mw0zis_di" bpmnElement="Activity_1mw0zis"><dc:Bounds x="740" y="80" width="100" height="80" /></bpmndi:BPMNShape><bpmndi:BPMNShape id="Activity_0zwv7v2_di" bpmnElement="Activity_0zwv7v2"><dc:Bounds x="920" y="80" width="100" height="80" /></bpmndi:BPMNShape><bpmndi:BPMNShape id="Event_008jxmb_di" bpmnElement="Event_008jxmb"><dc:Bounds x="1102" y="102" width="36" height="36" /></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn:definitions>',
            nodeInfo: null,
            nodeCondition: null,
            cancellation: 1,
            status: 1,
            enable: 1,
            version: 2,
            type: 2,
            deleted: 1,
            flowProcessId: 'Process_6TLnbM6:34:9be396bd-6737-11ee-bbf0-00ff340e69e9',
            ref: null,
            flowProcessKey: 'Process_6TLnbM6',
            serviceId: '1160226066376163329',
            serviceName: '测试1',
            isSystem: false,
            flowUniqueId: 'Process_6TLnbM6:34:9be396bd-6737-11ee-bbf0-00ff340e69e9:2',
          },
        ],
      },
      cycleNodeOption: [
        {
          id: '1016343773837262944',
          groupId: '1016343773837262900',
          itemId: null,
          itemVale: 'minute',
          itemType: 'cronCycle',
          itemLabel: '分钟',
          sort: 4,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262945',
          groupId: '1016343773837262900',
          itemId: null,
          itemVale: 'hour',
          itemType: 'cronCycle',
          itemLabel: '小时',
          sort: 5,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
      ],
      timeNodeOptions: [
        {
          id: '1016343773837262941',
          groupId: '1016313153744535550',
          itemId: null,
          itemVale: 'day',
          itemType: 'cronTiming',
          itemLabel: '每天',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262942',
          groupId: '1016313153744535550',
          itemId: null,
          itemVale: 'weekly',
          itemType: 'cronTiming',
          itemLabel: '每周',
          sort: 2,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262943',
          groupId: '1016313153744535550',
          itemId: null,
          itemVale: 'monthly',
          itemType: 'cronTiming',
          itemLabel: '每月',
          sort: 3,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
      ],
      cronWeeklyOptions: [
        {
          id: '1016343773837262969',
          groupId: '1016317051825815555',
          itemId: null,
          itemVale: '2',
          itemType: 'cronWeekly',
          itemLabel: '一',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262970',
          groupId: '1016317051825815555',
          itemId: null,
          itemVale: '3',
          itemType: 'cronWeekly',
          itemLabel: '二',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262971',
          groupId: '1016317051825815555',
          itemId: null,
          itemVale: '4',
          itemType: 'cronWeekly',
          itemLabel: '三',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262972',
          groupId: '1016317051825815555',
          itemId: null,
          itemVale: '5',
          itemType: 'cronWeekly',
          itemLabel: '四',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262973',
          groupId: '1016317051825815555',
          itemId: null,
          itemVale: '6',
          itemType: 'cronWeekly',
          itemLabel: '五',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262974',
          groupId: '1016317051825815555',
          itemId: null,
          itemVale: '7',
          itemType: 'cronWeekly',
          itemLabel: '六',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262975',
          groupId: '1016317051825815555',
          itemId: null,
          itemVale: '1',
          itemType: 'cronWeekly',
          itemLabel: '日',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
      ],
      timesOptions: [
        {
          id: '1016343773837262946',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '1',
          itemType: 'cronHour',
          itemLabel: '01:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262947',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '2',
          itemType: 'cronHour',
          itemLabel: '02:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262948',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '3',
          itemType: 'cronHour',
          itemLabel: '03:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262949',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '4',
          itemType: 'cronHour',
          itemLabel: '04:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262950',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '5',
          itemType: 'cronHour',
          itemLabel: '05:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262951',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '6',
          itemType: 'cronHour',
          itemLabel: '06:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262952',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '7',
          itemType: 'cronHour',
          itemLabel: '07:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262953',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '8',
          itemType: 'cronHour',
          itemLabel: '08:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262954',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '9',
          itemType: 'cronHour',
          itemLabel: '09:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262955',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '10',
          itemType: 'cronHour',
          itemLabel: '10:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262956',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '11',
          itemType: 'cronHour',
          itemLabel: '11:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262957',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '12',
          itemType: 'cronHour',
          itemLabel: '12:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262958',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '13',
          itemType: 'cronHour',
          itemLabel: '13:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262959',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '14',
          itemType: 'cronHour',
          itemLabel: '14:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262960',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '15',
          itemType: 'cronHour',
          itemLabel: '15:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262961',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '16',
          itemType: 'cronHour',
          itemLabel: '16:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262962',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '17',
          itemType: 'cronHour',
          itemLabel: '17:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262963',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '18',
          itemType: 'cronHour',
          itemLabel: '18:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262964',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '19',
          itemType: 'cronHour',
          itemLabel: '19:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262965',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '21',
          itemType: 'cronHour',
          itemLabel: '21:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262966',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '22',
          itemType: 'cronHour',
          itemLabel: '22:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262967',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '23',
          itemType: 'cronHour',
          itemLabel: '23:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
        {
          id: '1016343773837262968',
          groupId: '1016317051825815554',
          itemId: null,
          itemVale: '24',
          itemType: 'cronHour',
          itemLabel: '24:00',
          sort: 1,
          createDate: '2022-08-31 09:55:33',
          flag: false,
          isDeleted: 0,
        },
      ],
      hk1: false,
      hk2: false,
      knowId: null,
    }
  },
  computed: {},
  created() {
    this.knowId = this.$route.query?.id
    if (this.$route.query.id) {
      this.getDetail()
    }
    this.getConfigureObj()
  },
  methods: {
    getDetail() {
      details(this.knowId).then((res) => {
        this.formData = res
        this.formData.execValue = res.cron
        var list = []
        for (var item of res.orderList) {
          list.push(item.serviceId)
        }
        this.$set(this.formData, 'order', list)
        var ar = res.cron.split('_')
        if (res.cronType === '0') {
          // 周期
          console.log(ar, 'sss')
          this.formData.cycleTime = Number(ar[0])
          this.formData.cycleNode = ar[1]
        } else {
          // 定期
          if (ar.length === 3) {
            this.formData.timeNode = ar[0]
            this.formData.day = ar[1]
            this.formData.times = ar[2]
          } else {
            this.formData.timeNode = ar[0]
            this.formData.times = ar[1]
          }
        }
      })
    },
    /** 获取执行配置下拉框的数据 */
    getConfigureObj() {
      //   获取周期性执行 分钟/小时
      getDictList('cronCycle').then((res) => {
        this.cycleNodeOption = res
      })
      //   获取定期执行 每天、每月、每周
      getDictList('cronTiming').then((res) => {
        this.timeNodeOptions = res
      })
      //   每周
      getDictList('cronWeekly').then((res) => {
        this.cronWeeklyOptions = res
      })
      //  每小时
      getDictList('cronHour').then((res) => {
        this.timesOptions = res
      })
      //  每小时
      listServiceFlow().then((res) => {
        this.workList = res
      })
    },
    handleDelete(e) {
      console.log(e, 'fff')
      this.formData.order.splice(e.$index, 1)
      this.formData.orderList.splice(e.$index, 1)
    },
    // 下拉框 选中
    changeOrder(e) {
      console.log(e, 'eeeee')
      var ar = []
      for (var item of e) {
        var k = this.dictList.workList.find((j) => {
          return j.serviceId === item
        })
        var p = this.formData.orderList.find((h) => {
          return h.serviceId === k.serviceId
        })
        if (p) {
          this.$set(k, 'orderName', p.orderName)
        } else {
          this.$set(k, 'orderName', null)
        }

        ar.push(k)
      }
      this.formData.orderList = ar
    },
    changeCron() {
      this.formData.execValue = true
    },
    //  生成表达式
    setCron() {
      let execValue
      if (this.formData.cronType == '0') {
        execValue = `${this.formData.cycleTime}_${this.formData.cycleNode}`
      } else {
        if (this.formData.day) {
          execValue = `${this.formData.timeNode}_${this.formData.day}_${this.formData.times}`
        } else {
          execValue = `${this.formData.timeNode}_${this.formData.times}`
        }
      }
      this.formData.cron = execValue
    },
    // 提交事件
    submitForm() {
      this.$refs.hkFormRef1.handleFormSubmit('formLabels').then((res) => {
        this.setCron()
        this.hk1 = true
      })
      this.$refs.hkFormRef2.handleFormSubmit('formLabels').then((res) => {
        this.hk2 = true
        if (this.hk1 && this.hk2) {
          var obj = {
            id: res.id || undefined,
            status: res.status || undefined,
            jobName: res.jobName,
            cronType: res.cronType,
            cron: res.cron,
            remark: res.remark,
            orderList: res.orderList,
          }
          if (!this.$route.query.id) {
            add(obj).then((res) => {
              this.cancel()
              this.$message.success('新增成功')
            })
          } else {
            update(obj).then((res) => {
              this.$message.success('修改成功')
              this.cancel()
            })
          }
        }
      })
    },

    // 关闭按钮
    cancel() {
      this.$router.go(-1)
    },
  },
}
</script>

  <style lang="scss" scoped>
.flexBox {
  display: flex;
  justify-content: flex-start;
}
#app.dark-theme {
  .container,
  footer {
    background: transparent !important;
  }
  .c-box {
    background: rgba(59, 139, 255, 0.1);
  }
  .sp-flex i {
    color: #4b6eef !important;
  }
}
.type {
  color: #4b6eef;
  &.serious {
    color: #ff3535;
  }
  &.safe {
    color: #2cb274;
  }
}
@mixin common-style($bg, $before) {
  position: relative;
  background: rgba($color: #4b6eef, $alpha: $bg);
  &::before {
    content: '';
    position: absolute;
    background: rgba($color: #4b6eef, $alpha: $before);
  }
  &.serious {
    background: rgba($color: #ff3535, $alpha: $bg);
    &::before {
      background: rgba($color: #ff3535, $alpha: $before);
    }
  }
  &.safe {
    background: rgba($color: #2cb274, $alpha: $bg);
    &::before {
      background: rgba($color: #2cb274, $alpha: $before);
    }
  }
}
.tag {
  height: 32px;
  line-height: 32px;
  width: 80px;
  text-align: center;
}
.upload-title-box {
  height: 40px;
  width: 100%;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  // border-bottom: 1px solid rgba($color: #000000, $alpha: 8%);

  .upload-title {
    font-size: 16px;
    font-weight: 700;
    color: #000000;
  }
}
.container {
  padding: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #eef0f5;
}
.c-box {
  background: #fff;
  border-radius: 4px;
  padding: 20px;

  margin-bottom: 20px;
}
.el-form {
  flex: 1;
  overflow: auto;
}
footer {
  height: 70px;
  background: #fff;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 20px;
}
.add {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #fafafa;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.85);
  i {
    font-size: 32px;
  }
  p {
    margin-top: 10px;
  }
}
.info-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
.times {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  .el-empty {
    width: 75%;
  }
}
.rows {
  width: 75%;
  font-size: 14px;
  // max-height: 360px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  .sections {
    flex: 1;
    overflow: auto;
  }
  section {
    & + section {
      margin-top: 10px;
    }
    .bottom {
      display: flex;
      align-items: center;
      margin-top: 10px;
      padding: 15px 0;
      @include common-style(0.06, 1);
      &::before {
        width: 3px;
        height: 100%;
        top: 0;
        left: 2px;
      }
      span {
        display: inline-block;
        word-break: break-all;
        width: 50%;
        margin: 0 20px;
      }
    }
  }
  .el-button {
    width: 50px;
    margin-top: 10px;
    padding: 0 !important;
  }
}
.classify {
  font-size: 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  > div {
    margin-bottom: 20px;
  }
}
.empty-box {
  justify-content: center;
  align-items: center;
  display: flex;
}

.file-list {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  span {
    margin-left: 10px;
  }
}
::v-deep {
  .el-upload-list {
    display: none;
  }
  .el-table {
    height: auto;
  }
  .el-input-group__append {
    background: transparent;
  }
  .content {
    width: 100%;
    justify-content: flex-end;
    // margin: -20px 0;
  }
  .configuration-situation {
    border-top: 1px solid #e8e8e8;
    margin-bottom: 0;
    .left {
      border-right: 1px solid #e8e8e8;
    }
  }
}
</style>

